var gulp = require('gulp');
var browserify = require('browserify');
var babelify = require('babelify');
var source = require('vinyl-source-stream');
var shim = require('browserify-shim');
var webpack = require('gulp-webpack');
var named = require('vinyl-named');

gulp.task('script:build', function() {
	browserify('src/main.js')
		.transform(babelify, {
			presets: ['es2015', 'react']
		})
		.transform(shim)
		.bundle()
		.pipe(source('bundle.js'))
		//.pipe(named())
		//.pipe(webpack())

		.pipe(gulp.dest('./'));
});

gulp.task('default', ['script:build']);